package edu.predatorwars.shared.models;

import java.io.Serializable;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonProperty;



public class Resource implements Serializable
{
	
	public static final int RABBIT = 0;
	public static final int TURTLE = 1;
	public static final int HAWK = 2;
	public static final int RAM = 3; //(STR)
	public static final int WATER = 4;
	
	private final int resourceType;
	private final String description;
	
	private final Buff[] buffs;

	@JsonCreator
	public Resource(@JsonProperty("resourceType") int resourceType, @JsonProperty("description") String description, 
			@JsonProperty("buffs") Buff[] buffs)
	{
		this.resourceType = resourceType;
		this.description = description;
		this.buffs = buffs;
	}
	
	public int getResourceType() 
	{
		return resourceType;
	}

	public String getDescription() 
	{
		return description;
	}

	public Buff[] getBuffs() 
	{
		Buff[] rtnBuffs = new Buff[buffs.length];
		for(int i = 0;i<rtnBuffs.length;i++)
			rtnBuffs[i] = new Buff(buffs[i]);
		return rtnBuffs;
	}
}
